%  p.x, p.y : The location of the contour poinst
%  p.I : The image
%  p.t : same length as the coordinates, with "0" a major landmark point
%        and "2" only a simple point on the contour.
clear;
p=struct;
p=[];
for i=1:8 
    is=num2str(i); number = '000'; number(end-length(is)+1:end)=is; 
    filename=['Fotos/train' number '.mat'];
filename1=['Fotos/siweilxy' number '.JPG'];
load(filename);  
p.I=imread(filename1);
end

c=points1;
p.I=imread('Fotos/siweilxy001.JPG');
p.I=rgb2gray(p.I);
p.x=c(:,1);
p.y=c(:,2);
A={'1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67'}

imshow(p.I);
hold on;
for i=1:67

%tri=delaunay(p.x,p.y);
plot(p.x(i),p.y(i),'*');

end
text(p.x+0.001,p.y-0.01,A);
%for i=1:67
%t=[t 0];
%end
%p.t=t;
%p.n=67;
%triplot(tri,p.x,p.y);
%save('siweilxy001.mat','p');